{extend name="apps/common/view/front.tpl" /}
<!-- -->
{block name="header_meta"}
<title>{$term_title|DcEmpty=$term_name}－{:config('common.site_name')}</title>
<meta name="keywords" content="{$term_keywords|DcEmpty=$term_name}" />
<meta name="description" content="{$term_description|DcEmpty=$term_name}"  />
{/block}
<!-- -->
{block name="header"}{include file="widget/header" /}{/block}
<!--main -->
{block name="main"}
<div class="container pt-2">
<div class="row dh-row">
  <div class="col-12 px-0">{include file="widget/ads970" /}</div>
  <div class="col-12 col-md-4 col-lg-3 px-1 order-2 order-md-1">
    <div class="card mb-2">
      <div class="card-header px-2 bg-white d-flex flex-row justify-content-between align-items-center">
        <span><i class="fa fa-fw fa-coffee mr-1 text-danger"></i>人气排行</span>
        <a class="small text-danger" href="{:daohangUrlFilter(['controll'=>$term_controll,'termId'=>$term_id,'pageSize'=>20,'pageNumber'=>1,'sortName'=>'info_views','sortOrder'=>'desc'])}">更多>></a>
      </div>
      <div class="card-body px-2 pb-0">
        {volist name=":daohangSelect(['controll'=>$term_controll,'status'=>'normal','term_id'  => ['in',$term_ids],'limit'=>'10','sort'=>'info_views','order'=>'desc'])" id="mp"}
        <p class="text-truncate">
          {gt name="i" value="3"}
          <span class="badge dh-badge badge-secondary mr-2">{$i}</span>
          {else/}
          <span class="badge dh-badge badge-danger mr-2">{$i}</span>
          {/gt}
          <a class="{$mp.info_color|daohangColor}" href="{:daohangUrlInfo($mp)}">{$mp.info_name|daohangSubstr=0,12,false}</a>
          <small class="float-right text-muted">{$mp.info_views|number_format}</small>
        </p>
        {/volist}
      </div> 
    </div>
    {include file="widget/ads250" /}
  </div>
  <!---->
  <div class="col-12 col-md-8 col-lg-9 px-1 order-1 order-md-2">
    <ol class="breadcrumb bg-white mb-2">
      <li class="breadcrumb-item"><a class="text-danger" href="{:daohangUrl('daohang/index/index')}">首页</a></li>
      <li class="breadcrumb-item"><a href="{:daohangUrl('daohang/category/all')}">栏目分类</a></li>
      <li class="breadcrumb-item active">{$term_name|DcHtml}</li>
    </ol>
    <!---->
    {assign name="list" value=":daohangSelect([
      'cache'    => true,
      'status'   => 'normal',
      'controll' => $term_controll,
      'sort'     => $sortName,
      'order'    => $sortOrder,
      'limit'    => 60,
      'page'     => $pageNumber,
      'term_id'  => ['in',$term_ids],
    ])" /}
    <!---->
    <div class="card mb-2">
      <div class="card-body row pb-0 mb-0">
        {volist name="list.data" id="mp" mod="9"}
        <ul class="col-4 col-md-3 col-lg-2 list-unstyled text-truncate text-center">
          <li class="w-100 mb-2"><a href="{:daohangUrlInfo($mp)}"><img src="{:daohangUrlImage($mp['image_ico'],$mp['image_qrcode'])}" class="dh-circle border p-1" alt="{$mp.info_name|DcHtml}" width="64" height="64"></a></li>
          <li class="w-100"><a class="{$mp.info_color|daohangColor}" href="{:daohangUrlInfo($mp)}">{$mp.info_name|daohangSubstr=0,6,false}</a></li>
        </ul>
        {/volist}
      </div>
    </div>
    <!---->
    {gt name="list.last_page" value="1"}
    <div class="border rounded bg-white py-2 d-flex justify-content-center d-md-none mb-2">
      {:DcPageSimple($list['current_page'], $list['last_page'], $pagePath)}
    </div>
    <div class="d-none border rounded bg-white py-2 d-md-flex justify-content-center mb-2">
      {:DcPage($list['current_page'], $list['per_page'], $list['total'], $pagePath)}
    </div>
    {/gt}
  </div>
  <!---->
</div>
</div>
{/block}
<!-- -->
{block name="footer"}{include file="widget/footer" /}{/block}